
//---------------------------------------------------
// TABLE A5: Majority party status and alumni network
//---------------------------------------------------


clear
use masterdata_house.dta

gen ln_meansalary = ln(meansalary +1)
gen nolobstaff = numstaff - futurelob
gen femaleratio = numfemale/numstaff

gen lnles = ln(les+1)
gen lntotbill = ln(totbill+1)
gen lnssbill = ln(ss_bills +1)

gen int1 = futurelob*majority

macro define staff_char1 "nolobstaff ln_meansalary femaleratio futurelob cstaff_lob int1"
macro define member_char1 "majority dwnom1 budget chair subchr seniority maj_leader min_leader power dem membecamelob female afam latino state_leg south_dem"
macro define member_char2 "majority dwnom1 budget chair subchr seniority maj_leader min_leader power"


* Panel A: majority status

eststo clear
eststo: quietly reg lnles      $staff_char1 $member_char1 i.congress, vce(cluster icpsr)
eststo: quietly reg lntotbill  $staff_char1 $member_char1 i.congress, vce(cluster icpsr)
eststo: quietly reg lnssbill   $staff_char1 $member_char1 i.congress, vce(cluster icpsr)
eststo: quietly areg lnles     $staff_char1 $member_char2 i.congress, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lntotbill $staff_char1 $member_char2 i.congress, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lnssbill  $staff_char1 $member_char2 i.congress, a(icpsr) vce(cluster icpsr)
esttab, star(* 0.10 ** 0.05 *** 0.01)  drop(*congress*) se ar2 


* Panel B: alumni lobbyist effect

sort icpsr congress
by icpsr, sort: gen alumstaff108 = plast[_n-1] if congress == 108 
by icpsr, sort: gen alumstaff109 = plast[_n-1] if congress == 109 
by icpsr, sort: gen alumstaff110 = plast[_n-1] if congress == 110 
by icpsr, sort: gen alumstaff111 = plast[_n-1] if congress == 111 
by icpsr, sort: gen alumstaff112 = plast[_n-1] if congress == 112 
by icpsr, sort: gen alumstaff113 = plast[_n-1] if congress == 113 

sort icpsr congress alumstaff108
by icpsr, sort: replace alumstaff108 = alumstaff108[_n-1] if missing(alumstaff108) & _n >=1
sort icpsr congress alumstaff109
by icpsr, sort: replace alumstaff109 = alumstaff109[_n-1] if missing(alumstaff109) & _n >=1
sort icpsr congress alumstaff110
by icpsr, sort: replace alumstaff110 = alumstaff110[_n-1] if missing(alumstaff110) & _n >=1
sort icpsr congress alumstaff111
by icpsr, sort: replace alumstaff111 = alumstaff111[_n-1] if missing(alumstaff111) & _n >=1
sort icpsr congress alumstaff112
by icpsr, sort: replace alumstaff112 = alumstaff112[_n-1] if missing(alumstaff112) & _n >=1

replace alumstaff108 = 0 if alumstaff108 == .
replace alumstaff109 = 0 if alumstaff109 == .
replace alumstaff110 = 0 if alumstaff110 == .
replace alumstaff111 = 0 if alumstaff111 == .
replace alumstaff112 = 0 if alumstaff112 == .
replace alumstaff113 = 0 if alumstaff113 == .

gen totalumstaff = alumstaff108 if congress == 108
replace totalumstaff = alumstaff108 + alumstaff109 if congress == 109
replace totalumstaff = alumstaff108 + alumstaff109 + alumstaff110 if congress == 110
replace totalumstaff = alumstaff108 + alumstaff109 + alumstaff110 + alumstaff111 if congress == 111
replace totalumstaff = alumstaff108 + alumstaff109 + alumstaff110 + alumstaff111 + alumstaff112 if congress == 112
replace totalumstaff = alumstaff108 + alumstaff109 + alumstaff110 + alumstaff111 + alumstaff112 + alumstaff113 if congress == 113


macro define member_char1 "majority dwnom1 budget chair subchr seniority maj_leader min_leader power dem membecamelob female afam latino state_leg south_dem"
macro define member_char2 "majority dwnom1 budget chair subchr seniority maj_leader min_leader power"
macro define staff_char1 "nolobstaff ln_meansalary femaleratio futurelob cstaff_lob totalumstaff"


eststo clear
eststo: quietly reg lnles      $staff_char1 $member_char1  i.congress, vce(cluster icpsr)
eststo: quietly reg lntotbill  $staff_char1 $member_char1 i.congress, vce(cluster icpsr)
eststo: quietly reg lnssbill   $staff_char1 $member_char1 i.congress, vce(cluster icpsr)
eststo: quietly areg lnles     $staff_char1 $member_char2 i.congress, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lntotbill $staff_char1 $member_char2 i.congress, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lnssbill  $staff_char1 $member_char2 i.congress, a(icpsr) vce(cluster icpsr)
esttab, star(* 0.10 ** 0.05 *** 0.01) drop(*congress*) se ar2 
